import axios from 'axios'
// import NProgress from 'nprogress'
//配置axios
let http = axios.create({
    //基础地址
    baseURL: '/api',
    //超时设置
    timeout: 1000 * 10,
    //是否携带凭据
    withCredentials: true
})

//配置拦截器

//请求拦截器

http.interceptors.request.use(config => {
    // console.log(config);
    config.headers.authorization=sessionStorage.getItem('qf-token')
    return config
})

//响应拦截器
http.interceptors.response.use(config => {
    return config
})

export default http